package com.ym.medical.service;


import com.ym.core.utils.tkmybatis.IBaseSV;
import com.ym.medical.domain.entity.CouponEntity;
import com.ym.medical.domain.entity.UserHealthRecordEntity;
import com.ym.medical.domain.param.UserHealthRecordParam;
import com.ym.medical.domain.vo.UserAndHealthCoinSettingVO;
import com.ym.medical.domain.vo.UserHealthRecordVo;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-08-27
 * Time: 17:05:27
 * 健康币变动表服务接口
 */
public interface IUserHealthRecordSV extends IBaseSV<UserHealthRecordEntity> {

    /**
     * 增加健康币变动记录   (userId source incDec 必传项)
     * @param userHealthRecord
     */
    void addHealthCoin(UserHealthRecordParam userHealthRecord) throws Exception;


    /**
     * 检查健康币并增加健康币变动记录
     * @param userId 用户id
     * @param source 获取来源 （HealthCoinSourceEnum）
     * @param incDec 增加减少(ComputeWayEnum)
     */
    UserHealthRecordVo checkHealthCoin(Long userId, String source, String incDec);

    /**
     * 兑换优惠劵
     * @param coupon
     * @param userId
     */
    void exchangeCoupon(CouponEntity coupon, Long userId);

    /**
     * 根据来源获取健康币数量
     * @param source
     * @return
     */
    public Integer getHealthCoinNum(String source);
    /**
     * 查询该用户当天是否签到 是否授权
     * @param userId
     * @return
     */
    UserAndHealthCoinSettingVO selectUserSignAndAuth(Long userId);

    /**
     * 个人签到授权情况和健康币列表展示
     * @param userId
     * @return
     */
    UserAndHealthCoinSettingVO checkUserCondition(Long userId);
}
